package org.jcc.servlet.encoding.page.writer;

import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.Charset;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/encoding/page/printwriter/default")
public class EncodingPrintWriterDefault extends HttpServlet {

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		PrintWriter pw = response.getWriter();
		String header = "<html><head><meta charset='utf-8'></head><body>";
		String footer = "</body></html>";
		String dc = Charset.defaultCharset().toString();
		pw.write(header + "default: 缺省字符流" + dc + footer);
	}
	
	private static final long serialVersionUID = 1L;
}
